from scrapy.crawler import CrawlerProcess
from scrapy.utils.project import get_project_settings
from scrapy import cmdline
import crawl.spiders as sp
from multiprocessing import Process


# process = CrawlerProcess(get_project_settings())
# process.crawl(sp.NowcoderSpider)
# process.start() //对于不用传递参数的爬虫
def get_cf_race():
    pass


def get_at_race():
    pass


def get_nk_race():
    # 设置命令行参数
    opt = "race"
    extra_args = f"scrapy crawl nowcoder -a opt={opt}"
    # # 调用命令行接口执行 Scrapy 命令
    cmdline.execute(extra_args.split())


def get_lg_race():
    pass


def get_acm_race():
    pass
